home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: 28 June 1996
- // Author: jb
- //
- //
- // Procedure Name:
- // TimeSliderMenu
- //
- // Description:
- // This menu attaches a popup menu to the
- // timeslider, to allow for RMB cut/copy/paste
- // type operations without having to go to
- // the main menu for them.
- //
- // Input Arguments:
- // Parent to attach the menu to.
- //
- // Return Value:
- // None.
- //
-
- global proc setPlaybackRangeToStartEnd()
- //
- // Description:
- // Start/End values come from the last read file. If there
- // isn't one (file->new) tell the user why.
- //
- {
- string $sceneConfig = "sceneConfigurationScriptNode";
- string $oldSceneConfig = "animationScriptNode";
-
- // If a pre-4.0 file is read, use the animationScriptNode.
- //
- if (`objExists $oldSceneConfig`) {
- $sceneConfig = $oldSceneConfig;
- }
-
- // Look for the node named "sceneConfigurationScriptNode"
- //
- if (`objExists $sceneConfig`) {
- string $script = `scriptNode -q -bs $sceneConfig`;
- string $buff[];
- tokenize $script ";" $buff;
-
- string $line;
- for ($line in $buff) {
- if (size(`match "playbackOptions" $line`) > 0) {
- evalEcho $line;
- break;
- }
- }
- } else {
- error( "No start/end found in this scene. " +
- "Use File->save to set the current Animation Range " +
- "as the start/end for this scene." );
- }
- }
-
- global proc setPlaybackRangeToMinMax()
- //
- // Description:
- // Sometimes it's useful to set the playback range to be the
- // min/max of all the animation in the system. We define that
- // to be the first and last keys from all the time-based
- // animation curves we can find.
- //
- {
- // Get a list of animCurve in the system.
- // Check only for types created through
- // keyframing: time to linear, time to
- // angular, and time to unitless (for scale,
- // or user created attributes).
- //
- string $animTL[] = `ls -type animCurveTL`;
- string $animTA[] = `ls -type animCurveTA`;
- string $animTU[] = `ls -type animCurveTU`;
- string $animTT[] = `ls -type animCurveTT`;
-
- float $keys[];
- float $largestKey = -100000.0;
- float $smallestKey = 100000.0;
- int $keyCount = 0;
-
- for( $curve in $animTL ) {
- int $last = `keyframe -q -kc $curve`;
- if( $last > 0 ) {
- $last--;
- }
-
- $keys = `keyframe -index 0 -index $last -q -tc $curve`;
- $keyCount += size( $keys );
- for ( $key in $keys ) {
- if( $key > $largestKey )
- $largestKey = $key;
- if( $key < $smallestKey )
- $smallestKey = $key;
- }
- }
-
- for( $curve in $animTA ) {
- int $last = `keyframe -q -kc $curve`;
- if( $last > 0 ) {
- $last--;
- }
-
- $keys = `keyframe -index 0 -index $last -q -tc $curve`;
- $keyCount += size( $keys );
- for ( $key in $keys ) {
- if( $key > $largestKey )
- $largestKey = $key;
- if( $key < $smallestKey )
- $smallestKey = $key;
- }
- }
-
- for( $curve in $animTU ) {
- int $last = `keyframe -q -kc $curve`;
- if( $last > 0 ) {
- $last--;
- }
-
- $keys = `keyframe -index 0 -index $last -q -tc $curve`;
- $keyCount += size( $keys );
- for ( $key in $keys ) {
- if( $key > $largestKey )
- $largestKey = $key;
- if( $key < $smallestKey )
- $smallestKey = $key;
- }
- }
-
- for( $curve in $animTT ) {
- int $last = `keyframe -q -kc $curve`;
- if( $last > 0 ) {
- $last--;
- }
-
- $keys = `keyframe -index 0 -index $last -q -tc $curve`;
- $keyCount += size( $keys );
- for ( $key in $keys ) {
- if( $key > $largestKey )
- $largestKey = $key;
- if( $key < $smallestKey )
- $smallestKey = $key;
- }
- }
-
- // Only adjust the playback range if we've found animation.
- //
- if( $keyCount > 0 ) {
- playbackOptions -min (int( $smallestKey )) -max (int( $largestKey ));
- } else {
- error( "No keys found; cannot determine min/max of animation range.");
- }
- }
-
- global proc setPlaybackRangeToHighlight() {
- global string $gPlayBackSlider;
-
- if( `timeControl -q -rangeVisible $gPlayBackSlider` ) {
- float $highlight[] = `timeControl -q -rangeArray $gPlayBackSlider`;
- playbackOptions -min $highlight[0] -max $highlight[1];
- } else {
- error( "No range selected; use Shift-LMB to select a range." );
- }
- }
-
- global proc setPlaybackRangeToEnabledClips()
- //
- // Description:
- // Sometimes it's useful to set the playback range to be the
- // min/max of all the enabled clips in the system.
- //
- {
- // Get a list of all of the clipScheduler nodes in the system.
- //
- string $clipSchedulers[] = `ls -type clipScheduler`;
- if (`size($clipSchedulers)` == 0) {
- error( "No clips found; cannot determine clip animation range.");
- }
-
- float $lastTime = -100000.0;
- float $firstTime = 100000.0;
- int $nEnabledClips = 0;
-
- string $sch;
- for ($sch in $clipSchedulers) {
- string $scheduleList[] = `clipSchedule -q $sch`;
- string $s;
- for ($s in $scheduleList) {
- string $buff[7];
- tokenize($s,",",$buff);
-
- string $clip = $buff[0];
- int $index = $buff[1];
-
- // Check to see if this clip is enabled.
- //
- if (0 == `clipSchedule -ci $index -q -enable $sch`) {
- continue;
- }
-
- float $start = `getAttr ($clip + ".startFrame")`;
- float $duration = `getAttr ($clip + ".duration")`;
- float $trim = `getAttr ($clip + ".startTrim")`;
- float $scale = `getAttr ($clip + ".scale")`;
- float $cycle = `getAttr ($clip + ".cycle")`;
-
- float $visibleStart = ($start + $trim);
- float $end = $start + (($duration * $cycle) * $scale);
-
- if ($firstTime > $visibleStart) {
- $firstTime = $visibleStart;
- }
-
- if ($lastTime < $end) {
- $lastTime = $end;
- }
-
- $nEnabledClips++;
- }
- }
-
- if ($nEnabledClips == 0) {
- error("No enabled clips found; cannot determine clip animation range.");
- }
-
- int $intLast = int($lastTime);
- if ($intLast < $lastTime) {
- $lastTime += 1.0;
- }
-
- playbackOptions -min (int( $firstTime )) -max (int( $lastTime ));
- }
-
- global proc setPlaybackRangeToSound() {
- global string $gPlayBackSlider;
-
- string $node = `timeControl -q -sound $gPlayBackSlider`;
-
- if( size( $node ) > 0 ) {
-
- // Truncate any fractional bits.
- //
- int $min = `sound -q -offset $node`;
- int $max = int( $min + `sound -q -length $node` );
-
- playbackOptions -min $min -max $max;
- } else {
- error( "No sound displayed. Import a sound file, then use the " +
- "Sound menu to display it in the Time Slider." );
- }
- }
-
- global proc setPlaybackRangeToPrefs()
- //
- // Description:
- // Set the animation ranges to the prefs values.
- //
- {
- if( `optionVar -exists playbackMin`
- && `optionVar -exists playbackMax`
- && `optionVar -exists playbackMinRange`
- && `optionVar -exists playbackMaxRange` )
- {
- float $min = `optionVar -q playbackMin`;
- float $max = `optionVar -q playbackMax`;
- float $minRange = `optionVar -q playbackMinRange`;
- float $maxRange = `optionVar -q playbackMaxRange`;
-
- playbackOptions -min $min -max $max -ast $minRange -aet $maxRange;
- }
- }
-
- global proc timeSliderCutKey()
- //
- // Description:
- // Targets depend on whether we're showing ticks for
- // active or channel box attributes.
- //
- {
- global string $gPlayBackSlider;
-
- string $whichKeys = `timeControl -q -showKeys $gPlayBackSlider`;
- if ($whichKeys == "none") {
- return;
- }
-
- string $cmd = ("cutKey -an objects -iub false -t " +
- `timeControl -q -range $gPlayBackSlider` +
- " -o keys");
-
- // Only check for "active" since we know that this menu
- // item is disabled for the "none" case.
- //
- if( $whichKeys != "active" ) {
- string $curves[] = `timeControl -q -animCurveNames $gPlayBackSlider`;
- if( size( $curves ) > 0 ) {
- for( $curve in $curves ) {
- $cmd = $cmd + " " + $curve;
- }
- eval $cmd;
- }
- }
- else {
- string $members = expandSelectionConnection ("animationList");
- if (($members == "") || ($members == "{}")) {
- warning ("No objects selected to cut keys");
- }
- else {
- eval ($cmd + " " + $members);
- }
- }
- }
-
- global proc timeSliderCopyKey()
- //
- // Description:
- // Targets depend on whether we're showing ticks for
- // active or channel box attributes.
- //
- {
- global string $gPlayBackSlider;
-
- string $whichKeys = `timeControl -q -showKeys $gPlayBackSlider`;
- if ($whichKeys == "none") {
- return;
- }
-
- string $cmd = ("copyKey -an objects -iub false -t " +
- `timeControl -q -range $gPlayBackSlider` +
- " -o keys");
-
- // Only check for "active" since we know that this menu
- // item is disabled for the "none" case.
- //
- if( $whichKeys != "active" ) {
- string $curves[] = `timeControl -q -animCurveNames $gPlayBackSlider`;
- if( size( $curves ) > 0 ) {
- for( $curve in $curves ) {
- $cmd = $cmd + " " + $curve;
- }
- eval $cmd;
- }
- }
- else {
- string $members = expandSelectionConnection ("animationList");
- if (($members == "") || ($members == "{}")) {
- warning ("No objects selected to copy keys");
- }
- else {
- eval ($cmd + " " + $members);
- }
- }
- }
-
- global proc timeSliderClearKey()
- //
- // Description:
- // Targets depend on whether we're showing ticks for
- // active or channel box attributes.
- //
- {
- global string $gPlayBackSlider;
-
- string $whichKeys = `timeControl -q -showKeys $gPlayBackSlider`;
- if ($whichKeys == "none") {
- return;
- }
-
- string $cmd = ("cutKey -clear -iub false -an objects -t " +
- `timeControl -q -range $gPlayBackSlider` +
- " -o keys");
-
- // Only check for "active" since we know that this menu
- // item is disabled for the "none" case.
- //
- if( $whichKeys != "active" ) {
- string $curves[] = `timeControl -q -animCurveNames $gPlayBackSlider`;
- if( size( $curves ) > 0 ) {
- for( $curve in $curves ) {
- $cmd = $cmd + " " + $curve;
- }
- eval $cmd;
- }
- }
- else {
- string $members = expandSelectionConnection ("animationList");
- if (($members == "") || ($members == "{}")) {
- warning ("No objects selected to delete keys");
- }
- else {
- eval ($cmd + " " + $members);
- }
- }
- }
-
- global proc timeSliderSnapKey()
- //
- // Description:
- // Targets depend on whether we're showing ticks for
- // active or channel box attributes.
- //
- {
- global string $gPlayBackSlider;
-
- string $whichKeys = `timeControl -q -showKeys $gPlayBackSlider`;
- if ($whichKeys == "none") {
- return;
- }
-
- string $cmd = ("snapKey -iub false -an objects -t " +
- `timeControl -q -range $gPlayBackSlider`);
-
- // Only check for "active" since we know that this menu
- // item is disabled for the "none" case.
- //
- if( $whichKeys != "active" ) {
- string $curves[] = `timeControl -q -animCurveNames $gPlayBackSlider`;
- if( size( $curves ) > 0 ) {
- for( $curve in $curves ) {
- $cmd = $cmd + " " + $curve;
- }
- eval $cmd;
- }
- }
- else {
- string $members = expandSelectionConnection ("animationList");
- if (($members == "") || ($members == "{}")) {
- warning ("No objects selected to snap keys");
- }
- else {
- eval ($cmd + " " + $members);
- }
- }
- }
-
- global proc timeSliderPasteKey(int $connect)
- //
- // Description:
- // The "pasteKey" command issued depends on whether
- // a highlighted range is visible on the time slider.
- //
- {
- global string $gPlayBackSlider;
-
- string $whichKeys = `timeControl -q -showKeys $gPlayBackSlider`;
- if ($whichKeys == "none") {
- return;
- }
-
- global string $gChannelBoxName;
- string $cmd;
-
- if( `timeControl -q -rv $gPlayBackSlider` ) {
- string $timeRange = `timeControl -q -range $gPlayBackSlider`;
- $cmd = ("pasteKey -an objects -connect " + $connect + " -t " + $timeRange + " -includeUpperBound false -o scaleReplace");
- }
- else {
- float $time = `currentTime -q`;
- $cmd = ("pasteKey -an objects -connect " + $connect + " -t " + $time);
- }
-
- // Only check for "active" since we know that this menu
- // item is disabled for the "none" case.
- //
- if( $whichKeys != "active" ) {
- string $main[] = `channelBox -q -sma $gChannelBoxName`;
- string $shape[] = `channelBox -q -ssa $gChannelBoxName`;
- string $hist[] = `channelBox -q -sha $gChannelBoxName`;
-
- // Build up the list of attrs selected in the channel box
- //
- if(( size( $main ) > 0 )
- || ( size( $shape ) > 0 )
- || ( size( $hist ) > 0 ))
- {
- for( $attr in $main ) {
- $cmd = $cmd + " ." + $attr;
- }
- for( $attr in $shape ) {
- $cmd = $cmd + " ." + $attr;
- }
- for( $attr in $hist ) {
- $cmd = $cmd + " ." + $attr;
- }
-
- eval $cmd;
- }
- }
- else {
- string $members = expandSelectionConnection ("animationList");
- if (($members == "") || ($members == "{}")) {
- warning ("No objects selected to paste keys");
- }
- else {
- eval ($cmd + " " + $members);
- }
- }
- }
-
-
- global proc timeSliderEditKeys( string $type )
- //
- // Description:
- //
- //
- {
- global string $gPlayBackSlider;
-
- string $whichKeys = `timeControl -q -showKeys $gPlayBackSlider`;
- if ($whichKeys == "none") {
- return;
- }
-
- string $cmd = "keyframe ";
- switch ($type) {
- case "makeKey":
- $cmd = $cmd + "-breakdown false ";
- $cmd = $cmd + (" -an objects -iub false -t " +
- `timeControl -q -range $gPlayBackSlider`);
- break;
- case "makeBreakdown":
- $cmd = $cmd + "-breakdown true ";
- $cmd = $cmd + (" -an objects -iub false -t " +
- `timeControl -q -range $gPlayBackSlider`);
- break;
- case "addInbetween":
- $cmd = $cmd + "-time \"" + `currentTime -query` + ":\" " +
- "-relative -timeChange 1 -option over";
- break;
- case "removeInbetween":
- $cmd = $cmd + "-time \"" + `currentTime -query` + ":\" " +
- "-relative -timeChange -1 -option over";
- break;
- }
-
- if( $whichKeys != "active" ) {
- string $curves[] = `timeControl -q -animCurveNames $gPlayBackSlider`;
- if( size( $curves ) > 0 ) {
- for( $curve in $curves ) {
- $cmd = $cmd + " " + $curve;
- }
- eval $cmd;
- }
- }
- else {
- string $members = expandSelectionConnection ("animationList");
- if (($members == "") || ($members == "{}")) {
- warning ("No objects selected to edit keys");
- }
- else {
- eval ($cmd + " " + $members);
- }
- }
- }
-
- global proc timeSliderSetTangent( string $type )
- //
- // Description:
- //
- //
- {
- global string $gPlayBackSlider;
-
- string $whichKeys = `timeControl -q -showKeys $gPlayBackSlider`;
- if ($whichKeys == "none") {
- return;
- }
-
- string $cmd = "keyTangent";
- if ($type != "step") {
- $cmd = ($cmd + " -itt " + $type);
- }
- $cmd = ($cmd + " -ott " + $type +
- " -an objects -iub false -t " +
- `timeControl -q -range $gPlayBackSlider`);
-
- if( $whichKeys != "active" ) {
- string $curves[] = `timeControl -q -animCurveNames $gPlayBackSlider`;
- if( size( $curves ) > 0 ) {
- for( $curve in $curves ) {
- $cmd = $cmd + " " + $curve;
- }
- eval $cmd;
- }
- }
- else {
- string $members = expandSelectionConnection ("animationList");
- if (($members == "") || ($members == "{}")) {
- warning ("No objects selected to set tangents");
- }
- else {
- eval ($cmd + " " + $members);
- }
- }
- }
-
-
- global proc updateTimeSliderMenu()
- //
- // Description:
- // Grey out menu entries based on the "Time slider show
- // ticks" option
- //
- {
- global string $gPlayBackSlider;
-
- string $whichKeys = `timeControl -q -showKeys $gPlayBackSlider`;
-
- if( $whichKeys == "none" ) {
- menuItem -e -enable false timeSliderCutKeyItem;
- menuItem -e -enable false timeSliderCopyKeyItem;
- menuItem -e -enable false timeSliderPasteKeyItem;
- menuItem -e -enable false timeSliderClearKeyItem;
- menuItem -e -enable false timeSliderSnapKeyItem;
- menuItem -e -enable false timeSliderKeysItem;
- menuItem -e -enable false timeSliderTangentsItem;
- } else {
- menuItem -e -enable true timeSliderCutKeyItem;
- menuItem -e -enable true timeSliderCopyKeyItem;
- menuItem -e -enable true timeSliderPasteKeyItem;
- menuItem -e -enable true timeSliderClearKeyItem;
- menuItem -e -enable true timeSliderSnapKeyItem;
- menuItem -e -enable true timeSliderKeysItem;
- menuItem -e -enable true timeSliderTangentsItem;
- }
- }
-
-
- global proc TimeSliderMenu( string $parent )
- {
- popupMenu -aob true -b 3 -mm 0 -p $parent -pmc updateTimeSliderMenu
- TimeSliderMenu;
-
- menuItem -l "Cut"
- -annotation "Cut Keys: Remove keys and place on animation clipboard"
- timeSliderCutKeyItem;
- menuItem -l "Copy"
- -annotation "Copy Keys: Copy keys and place on animation clipboard"
- timeSliderCopyKeyItem;
- menuItem -l "Paste" -subMenu yes -tearOff yes timeSliderPasteKeyItem;
- menuItem -l "Paste"
- -annotation "Paste Keys: Paste keys from animation clipboard"
- timeSliderPasteItem;
- menuItem -l "Paste Connect"
- -annotation "Paste Connect: Paste and connect keys from animation clipboard"
- timeSliderPasteConnectItem;
- setParent -menu ..;
- menuItem -l "Delete"
- -annotation "Delete Keys: Delete keys but do not place on animation clipboard"
- timeSliderClearKeyItem;
- menuItem -l "Snap"
- -annotation "Snap Keys: Snap keys to integer times"
- timeSliderSnapKeyItem;
- menuItem -l "Keys" -subMenu yes -tearOff yes timeSliderKeysItem;
- menuItem -l "Convert to Key"
- -ann "Convert to Key: Change existing breakdowns into keys"
- timeSliderMakeKeyItem;
- menuItem -l "Convert to Breakdown"
- -ann "Convert to Breakdown: Change existing keys into breakdowns"
- timeSliderMakeBreakdownItem;
- menuItem -l "Add Inbetween"
- -ann "Add Inbetween: Insert inbetween at current time"
- timeSliderAddInbetweenItem;
- menuItem -l "Remove Inbetween"
- -ann "Remove Inbetween: Remove inbetween at current time"
- timeSliderRemoveInbetweenItem;
- setParent -menu ..;
- menuItem -l "Tangents" -subMenu yes -tearOff yes timeSliderTangentsItem;
- menuItem -l "Spline"
- -ann "Spline Tangents: Set in- and out-tangents to Spline"
- timeSliderSplineItem;
- menuItem -l "Linear"
- -ann "Linear Tangents: Set in- and out-tangents to Linear"
- timeSliderLinearItem;
- menuItem -l "Clamped"
- -ann "Clamped Tangents: Set in- and out-tangents to Clamped"
- timeSliderClampedItem;
- menuItem -l "Stepped"
- -ann "Stepped Tangents: Set out-tangent to Stepped"
- timeSliderSteppedItem;
- menuItem -l "Flat"
- -ann "Flat Tangents: Set in- and out-tangents to Flat"
- timeSliderFlatItem;
- setParent -menu ..;
-
- menuItem -divider true;
-
- menuItem -l "Playback Looping"
- -subMenu true -tearOff yes
- playbackLoopItem;
-
- menuItem -l "Once"
- -c "evalEcho playbackOptions -l \"once\""
- -ann "Playback Looping: Set to Once"
- playbackLoopOnceItem;
- menuItem -l "Oscillate"
- -c "evalEcho playbackOptions -l \"oscillate\""
- -ann "Playback Looping: Set to Oscillate"
- playbackLoopOscillateItem;
- menuItem -l "Continuous"
- -c "evalEcho playbackOptions -l \"continuous\""
- -ann "Playback Looping: Set to Continuous"
- playbackLoopContinuousItem;
-
- setParent -m ..;
-
- menuItem -l "Set Range to" -subMenu true -tearOff yes playbackRangeItem;
-
- menuItem -l "Start/End" -c "evalEcho setPlaybackRangeToStartEnd"
- -ann "Playback Range: Set to times stored with current scene"
- playbackRangeStartEndItem;
- menuItem -l "Min/Max" -c "evalEcho setPlaybackRangeToMinMax"
- -ann "Playback Range: Set to times of first and last keys"
- playbackRangeMinMaxItem;
- menuItem -l "Selected" -c "evalEcho setPlaybackRangeToHighlight"
- -ann "Playback Range: Set to currently selected range in Time Slider"
- playbackRangeHighlightItem;
- menuItem -l "Enabled Clips" -c "evalEcho setPlaybackRangeToEnabledClips"
- -ann "Playback Range: Set to times of the enabled clips."
- playbackRangeEnabledClipsItem;
- menuItem -l "Sound Length" -c "evalEcho setPlaybackRangeToSound"
- -ann "Playback Range: Set to length of currently displayed sound"
- playbackRangeSoundItem;
- menuItem -l "Preferences" -c "evalEcho setPlaybackRangeToPrefs"
- -ann "Playback Range: Set to values in Animation Preferences"
- playbackRangePrefsItem;
-
- setParent -m ..;
-
- menuItem -e -c "evalEcho timeSliderCutKey" timeSliderCutKeyItem;
- menuItem -e -c "evalEcho timeSliderCopyKey" timeSliderCopyKeyItem;
- menuItem -e -c "evalEcho \"timeSliderPasteKey false\"" timeSliderPasteItem;
- menuItem -e -c "evalEcho \"timeSliderPasteKey true\"" timeSliderPasteConnectItem;
- menuItem -e -c "evalEcho timeSliderClearKey" timeSliderClearKeyItem;
- menuItem -e -c "evalEcho timeSliderSnapKey" timeSliderSnapKeyItem;
-
- menuItem -e -c "evalEcho \"timeSliderEditKeys makeKey\"" timeSliderMakeKeyItem;
- menuItem -e -c "evalEcho \"timeSliderEditKeys makeBreakdown\"" timeSliderMakeBreakdownItem;
- menuItem -e -c "evalEcho \"timeSliderEditKeys addInbetween\"" timeSliderAddInbetweenItem;
- menuItem -e -c "evalEcho \"timeSliderEditKeys removeInbetween\"" timeSliderRemoveInbetweenItem;
-
- menuItem -e -c "evalEcho \"timeSliderSetTangent spline\"" timeSliderSplineItem;
- menuItem -e -c "evalEcho \"timeSliderSetTangent linear\"" timeSliderLinearItem;
- menuItem -e -c "evalEcho \"timeSliderSetTangent clamped\"" timeSliderClampedItem;
- menuItem -e -c "evalEcho \"timeSliderSetTangent step\"" timeSliderSteppedItem;
- menuItem -e -c "evalEcho \"timeSliderSetTangent flat\"" timeSliderFlatItem;
-
- string $soundMenu = `menuItem -label "Sound"
- -subMenu true -allowOptionBoxes true`;
-
- menuItem -e -pmc (
- "updateSoundMenu { " +
- "\"" + $soundMenu + "\", " + // menu name
- "\"1\", " + // use radios
- "\"setSoundDisplay %s 1\", " + // cmd when selected
- "\"Display sound in Time Slider for %s\", " + // annotation
- "\"setSoundDisplay `timeControl -q -s " + // off radio cmd
- "$gPlayBackSlider` 0\", " + // (cont'd)
- "\"showEditor %s\" " + // option box cmd
- "};"
- )
- $soundMenu;
-
- setParent -m ..;
-
- menuItem -l "Playblast..."
- -c "performPlayblast 3"
- -annotation "Playblast: Preview animation by screen-capturing frames"
- timeSliderPlayblastItem;
- menuItem -optionBox true -c "performPlayblast 4"
- timeSliderPlayblastOptionItem;
-
- setParent -m ..;
- }
-